﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebFormProveedor.aspx.cs" Inherits="Sitio.WebFormProveedor" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Proveedor</title>
     <link href ="estilo.css"  rel="Stylesheet" type="text/css" />
</head>
<body style="height: 251px; width: 755px;">
    <form id="form1" runat="server">
    <div>
    
        <strong><asp:Label ID="lbProveedores" runat="server" Text="Proveedores" 
            Font-Size="X-Large"></asp:Label></strong>
        <br />
        <strong>
        <asp:Label ID="lblMensaje" runat="server" 
            style="background-color: #FFFFFF; color: #FF0000; font-size: large;"></asp:Label></strong>
    
    </div>
    <asp:Panel ID="pnlOp" runat="server">
        <asp:Button ID="btNuevo" runat="server" Text="Nuevo" onclick="btNuevo_Click" 
            style="font-size: medium" />
        <asp:Button ID="btBuscar" runat="server" Text="Buscar" 
            onclick="btBuscar_Click" style="font-size: medium" />
        &nbsp;&nbsp;&nbsp;
        <asp:Button ID="btRegresar" runat="server" onclick="btRegresar_Click" 
            Text="Regresar" style="font-size: medium" />
    </asp:Panel>
    <asp:Panel ID="pnlNuevo" runat="server" Height="263px" 
        style="margin-top: 8px; margin-right: 0px;" Width="994px">
        <strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </strong>
        <br />
        <strong><asp:Label ID="Label2" runat="server" Text="Nombre:" 
            style="font-size: medium"></asp:Label></strong>
        <asp:TextBox ID="tbNombre" runat="server" Width="184px" ></asp:TextBox>
        &nbsp;
        <asp:RequiredFieldValidator ID="RFVNombre" runat="server" 
            ControlToValidate="tbNombre" ErrorMessage="RequiredFieldValidator" 
            ValidationGroup="Validar" style="font-weight: 700">Ingrese Nombre</asp:RequiredFieldValidator>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:RegularExpressionValidator ID="REVNombre" runat="server" 
            ControlToValidate="tbNombre" ErrorMessage="RegularExpressionValidator" 
            ValidationExpression="[a-zA-ZñÑ\s]{2,50}" ValidationGroup="Validar" 
            Display="Dynamic" style="font-weight: 700">Inserte Solo Letras</asp:RegularExpressionValidator>
        &nbsp;&nbsp;
        <asp:TextBox ID="tbCodigo" runat="server" Visible="False" 
            style="margin-left: 19px"></asp:TextBox><br />
        <br />
        <strong><asp:Label ID="Label3" runat="server" Text="Telefono:"></asp:Label></strong>
        <asp:TextBox ID="tbTelefono" runat="server" Width="176px" ></asp:TextBox>&nbsp;
        <asp:RequiredFieldValidator ID="RFVTelefono" runat="server" 
            ControlToValidate="tbTelefono" ErrorMessage="RequiredFieldValidator" 
            ValidationGroup="Validar" style="font-weight: 700">Ingrese Telefono</asp:RequiredFieldValidator>
        &nbsp;&nbsp;&nbsp;
        <asp:RegularExpressionValidator ID="REVTelefono" runat="server" 
            ControlToValidate="tbTelefono" ErrorMessage="RegularExpressionValidator" 
            ValidationExpression="[0-9]{1,9}(\.[0-9]{0,2})?$" 
            ValidationGroup="Validar" style="font-weight: 700">Ingrese Solo Numeros</asp:RegularExpressionValidator>
        <br />
        <br />
        <strong>
        <asp:Label ID="Label4" runat="server" Text="Direccion:"></asp:Label>
        </strong>
        <asp:TextBox ID="tbDireccion" runat="server" Width="166px" ></asp:TextBox>
&nbsp;
        <asp:RequiredFieldValidator ID="RFVDireccion" runat="server" 
            ControlToValidate="tbDireccion" ErrorMessage="RequiredFieldValidator" 
            ValidationGroup="Validar" style="font-weight: 700">Ingrese Direccion</asp:RequiredFieldValidator>
        &nbsp;&nbsp;
        <br />
        <br />
        <strong>
        <asp:Label ID="Label5" runat="server" Text="Descripcion:"></asp:Label>
        </strong>
        <asp:TextBox ID="tbDescripcion" runat="server" Height="23px" 
            style="margin-top: 11px" Width="510px" ></asp:TextBox>
&nbsp;
        <asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" 
            ControlToValidate="tbDescripcion" ErrorMessage="RequiredFieldValidator" 
            ValidationGroup="Validar" style="font-weight: 700">Ingrese Descripcion</asp:RequiredFieldValidator>
&nbsp;
        <br />
        <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="btGuardar" runat="server" Text="Guardar" 
            onclick="btGuardar_Click" ValidationGroup="Validar" 
            style="font-size: medium" />
    </asp:Panel>
    <asp:Panel ID="pnlBuscar" runat="server">
        <asp:GridView ID="grdProveedores" runat="server" AutoGenerateColumns="False"
            onrowcommand="ResultGrid_RowCommand" 
                onselectedindexchanged="grdProveedores_SelectedIndexChanged" 
            BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
            CellPadding="4" EnableModelValidation="True" ForeColor="Black" 
            GridLines="Horizontal">
                <EmptyDataTemplate>
                    No se encontraron resultados para la busqueda.
                </EmptyDataTemplate>
                <Columns>
                    <asp:BoundField DataField="id" HeaderText="Codigo" Visible="false" />
                    <asp:TemplateField HeaderText="Eliminar"> 
			            <ItemTemplate>
                            <asp:ImageButton runat="server" ID="Delete" ImageUrl="~/ImagenesGridView/eliminar.png" CommandName="Eliminar" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"LPROVEEDOR1") %>'  />
                            
			            </ItemTemplate>
		            </asp:TemplateField>
                    <asp:TemplateField HeaderText="Editar">            
			            <ItemStyle HorizontalAlign="Center"></ItemStyle>
			            <ItemTemplate>
                            <asp:ImageButton runat="server" ID="Edit" ImageUrl="~/ImagenesGridView/editar.jpg" CommandName="Editar" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"LPROVEEDOR1") %>' />
			            </ItemTemplate>
		            </asp:TemplateField>
                    <asp:BoundField DataField="SNOMBRE1" HeaderText="Nombre"/>
                    <asp:BoundField DataField="STELEFONO1" HeaderText="Telefono" />
                    <asp:BoundField DataField="SDIRECCION1" HeaderText="Direccion" />
                    <asp:BoundField DataField="SDESCRIPCION_DSC1" HeaderText="Descripcion" />
                </Columns>
                <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
        </asp:GridView>
    </asp:Panel>
    </form>
</body>
</html>
